package indi.h.mlx.core.bean;

import java.util.ArrayList;
import java.util.List;

import indi.h.mlx.custom.annotations.CTable;

public class Table {
	public CTable table;

	public String[] fieldName;

	public List<Column> ids;

	public List<Column> joins;

	public List<Column> columns;

	public Table(CTable table) {
		this.table = table;
		this.fieldName = new String[1];
		this.ids = new ArrayList<>();
		this.joins = new ArrayList<>();
		this.columns = new ArrayList<>();
	}

	public void addId(Column id) {
		this.ids.add(id);
	}

	public void addJoin(Column join) {
		this.joins.add(join);
	}

	public void addColumn(Column column) {
		this.columns.add(column);
	}

	public CTable getTable() {
		return table;
	}

	public List<Column> getIds() {
		return ids;
	}

	public void setIds(List<Column> ids) {
		this.ids = ids;
	}

	public List<Column> getJoins() {
		return joins;
	}

	public void setJoins(List<Column> joins) {
		this.joins = joins;
	}

	public List<Column> getColumns() {
		return columns;
	}

	public void setColumns(List<Column> columns) {
		this.columns = columns;
	}

	public void setTable(CTable table) {
		this.table = table;
	}

	public void setFieldName(String[] fieldName) {
		this.fieldName = fieldName;
	}

	public String[] getFieldName() {
		return fieldName;
	}

	public void setFieldName(String fieldName) {
		this.fieldName[0] = fieldName;
	}

}
